// DlgRequestFind.cpp : implementation file
//

#include "stdafx.h"
#include "Celsus.h"
#include "DlgRequestFind.h"


// CDlgRequestFind dialog

IMPLEMENT_DYNAMIC(CDlgRequestFind, CDialog)

CDlgRequestFind::CDlgRequestFind(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgRequestFind::IDD, pParent)
	, m_szFind(_T(""))
{

}

CDlgRequestFind::~CDlgRequestFind()
{
}

void CDlgRequestFind::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Text(pDX, IDC_EDIT_FIND, m_szFind);
}


BEGIN_MESSAGE_MAP(CDlgRequestFind, CDialog)
END_MESSAGE_MAP()


// CDlgRequestFind message handlers
BOOL CDlgRequestFind::OnInitDialog()
{
	CDialog::OnInitDialog();

	// set title
	if( !m_szTitle.IsEmpty() )
		SetWindowText( m_szTitle );

	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}

void CDlgRequestFind::OnOK()
{
	// update data
	UpdateData();

	// check for empty
	if( m_szFind.IsEmpty() )
	{
		CDialog::OnCancel();
		return;
	}
	// return ok
	CDialog::OnOK();
}
